import assessCheckApi from './api'
import { axios } from '@/utils/request'

export function ocalityPostAction(data) {
  //console.log('字典传参',data)
  return axios({
    url: assessCheckApi.dict,
    method:'get' ,
    params:data,
    url_1:'outside'
  })
}

// 流程列表-分页查询
export function list(params){
  return axios({
    url: assessCheckApi.list,
    method:'get',
    params:{...params},
    url_2:'outside',
  })
}

// 更新年度信息
export function myndxx(params){
  return axios({
    url: assessCheckApi.myndxx,
    method:'get',
    params:{...params},
    url_2:'outside',
  })
}

// 发起请休假
export function initBzFlow(data){
  return axios({
    url: assessCheckApi.initBzFlow,
    method:'post' ,
    data:{...data},
    url_2:'outside',
  })
}

// 请假说明
export function myqxsm(params){
  return axios({
    url: assessCheckApi.myqxsm,
    method:'get',
    params:{...params},
    url_2:'outside',
  })
}

// 删除请休假流程
export function deleteLgqsFlowJob(params){
  return axios({
    url: assessCheckApi.deleteLgqsFlowJob,
    method:'delete' ,
    params:{...params},
    url_2:'outside',
  })
}

// 查询当前流程任务详情
export function queryJobByJobId(params){
  return axios({
    url: assessCheckApi.queryJobByJobId,
    method:'get',
    params:{...params},
    url_2:'outside',
  })
}
// 获取已办列表-通过当前流程id-自定义退回
export function queryAllYbJob(params){
    return axios({
      url: assessCheckApi.queryAllYbJob,
      method:'get',
      params:{...params},
      url_2:'outside',
    })
}
// 自定义-退回环节
export function returnUpperzdyFlowJob(data){
    return axios({
      url: assessCheckApi.returnUpperzdyFlowJob,
      method:'post' ,
      data:{...data},
      url_2:'outside',
    })
}

// 请休假保存接口
export function saveFlow(data){
  return axios({
    url: assessCheckApi.saveFlow,
    method:'post' ,
    data:{...data},
    url_2:'outside',
  })
}

// 请休假提交接口
export function submitFlow(data){
  return axios({
    url: assessCheckApi.submitFlow,
    method:'post' ,
    data:{...data},
    url_2:'outside',
  })
}

// 流程监控-分页查询
export function flowJkPage(params){
  return axios({
    url: assessCheckApi.flowJkPage,
    method:'get',
    params:{...params},
    url_2:'outside',
  })
}

// --------------------
// minio-OA-上传附件
export function fjupload(data){
  return axios({
    url: assessCheckApi.fjupload,
    method:'post' ,
    data:data,
    url_2:'outside',
    // responseType: 'arraybuffer'
  })
}
// OA附件资源库-编辑
export function fjedit(data){
  return axios({
    url: assessCheckApi.fjedit,
    method:'put' ,
    data:{...data},
    url_2:'outside',
  })
}
// 附件删除
export function deleleMinioFile(params){
  return axios({
    url: assessCheckApi.deleleMinioFile,
    method:'get' ,
    params:{...params},
    url_2:'outside',
  })
}
// OA-打开文档-服务端-只读
export function openFile(params){
  return axios({
    url: assessCheckApi.openFile,
    method:'get' ,
    params:{...params},
    url_2:'outside',
  })
}
// minio-下载附件
export function downLoadOa(params){
  return axios({
    url: assessCheckApi.downLoadOa,
    method:'get' ,
    params:{...params},
    url_2:'outside',
    responseType: 'arraybuffer'
  })
}
// OA附件资源库-分页列表查询
export function fjlist(params){
  return axios({
    url: assessCheckApi.fjlist,
    method:'get' ,
    params:{...params},
    url_2:'outside',
  })
}

// 下载个人签名
export function downMyQm(params){
  return axios({
    url: assessCheckApi.downMyQm,
    method:'get' ,
    params:{...params},
    url_1:'outside',
    responseType: 'arraybuffer'
  })
}

// 请休假审批表-编辑
export function editFuntion(data){
  return axios({
    url: assessCheckApi.editFuntion,
    method:'put',
    data:{...data},
    url_2:'outside',
  })
}
// 流程业务主表-添加
export function fjAdd(data){
  return axios({
    url: assessCheckApi.fjAdd,
    method:'post' ,
    data:data,
    url_2:'outside',
  })
}

// 办公室环节意见自动填写
export function rsyjDefault(params){
  return axios({
    url: assessCheckApi.rsyjDefault,
    method:'get' ,
    params:{...params},
    url_2:'outside',
  })
}

// 下载个人签名
export function getMoreUserSignLinkList(params){
    return axios({
        url: assessCheckApi.getMoreUserSignLinkList,
        method:'get' ,
        params:{...params},
        url_1:'outside',
        // responseType: 'arraybuffer',
    })
}

//
export function pidgetlchj(params){
    return axios({
        url: assessCheckApi.pidgetlchj,
        method:'get' ,
        params:{...params},
        url_2:'outside',
    })
}
